'''
Dictionary of all constants and text
'''
import pygame;
import spyral;

colors = {}
strings = {}
geom = {}
fonts = {}
images = {}

spyral.init()


colors['bg'] = (0, 0, 0)
colors['score'] = (255, 255, 255)
colors['menu'] = (255, 255, 255)
colors['transparent'] = (255, 0 ,255)
colors['black'] = (0, 0, 0)
colors['grey'] = (125, 125, 125)
colors['white'] = (255, 255, 255)
colors['blue'] =(10,10,210)
colors['red'] = (210, 10, 10)
colors['green'] = (10, 210, 10)


strings['menu_title'] = "Payback Pigs ALPHA"
strings['menu_instructions'] = "Press SPACE to start. Press ESC to quit."
strings['gameover_title'] = "GAME OVER: Return to Base"
strings['gameover_instructions'] = "Press SPACE to play again. Press ESC to quit."


geom['size'] = (960, 640)
geom['width'] = geom['size'][0]
geom['height'] = geom['size'][1]
geom['score_in_height'] = int(.03*geom['height'])
geom['score_font_size'] = int(.08*geom['height'])
geom['menu_title_font_size'] = int(.15*geom['height'])
geom['junk_font_size'] = int(.04*geom['height'])
geom['menu_font_size'] = int(.06*geom['height'])
geom['gameover_score_font_size'] = int(.12*geom['height'])
geom['guidebar_font_size'] = int(.03*geom['height'])


fonts['score'] = pygame.font.SysFont(None, geom['score_font_size'])
fonts['menu'] = pygame.font.SysFont(None, geom['menu_font_size'])
fonts['menu_title'] = pygame.font.SysFont(None, geom['menu_title_font_size'])
fonts['gameover_title'] = pygame.font.SysFont(None, geom['gameover_score_font_size'])
fonts['qdisplay_collect'] = pygame.font.SysFont(None, 30)
fonts['qdisplay_question'] = pygame.font.SysFont(None, 90)


#based on where the __main__ file is
'Game'
def setImgFolder(folder = './images/'):
    images['001bg'] = folder + '001bg.png'
    images['001instr'] = folder + '001instr.png';
    images['001roundpig'] = folder + '001roundpig.png';
    images['001signleft'] = folder + '001signleft.png';
    images['001signright'] = folder + '001signright.png';
    images['002bg'] = folder + '002bg.png'
    images['002instr'] = folder + '002instr.png'
    images['002pig'] = folder + '002pig.png'
    images['002pigfly'] = folder + '002pigfly.png'
    images['003bg'] = folder + '003bg.png'
    images['003button'] = folder + '003button.png'
    images['003buttonpressed'] = folder + '003buttonpressed.png'
    images['003devil'] = folder + '003devil.png'
    images['003gotcha'] = folder + '003gotcha.png'
    images['003pig'] = folder + '003pig.png'
    images['003talk'] = folder + '003talk.png'
    images['003instr'] = folder + '003instr.png'
    images['004instr'] = folder + '004instr.png'
    images['004bg'] = folder + '004bg.png'
    images['004invader'] = folder + '004invader.png'
    images['004explosion'] = folder + '004explosion.png'
    images['004laser'] = folder + '004laser.png'
    images['004ship'] = folder + '004ship.png'
    images['004shipred'] = folder + '004shipred.png'
    images['005bg'] = folder + '005bg.png'
    images['005instr'] = folder + '005instr.png'
    images['005pigopen'] = folder + '005pigopen.png'
    images['005pigclosed'] = folder + '005pigclosed.png'
    images['005conveyor0'] = folder + '005conveyor0.png'
    images['005conveyor1'] = folder + '005conveyor1.png'
    images['005conveyor2'] = folder + '005conveyor2.png'
    images['005conveyor3'] = folder + '005conveyor3.png'
    images['005conveyor4'] = folder + '005conveyor4.png'
    images['005conveyor5'] = folder + '005conveyor5.png'
    images['005conveyor6'] = folder + '005conveyor6.png'
    images['005conveyor7'] = folder + '005conveyor7.png'
    images['005conveyor8'] = folder + '005conveyor8.png'
    images['005food00'] = folder + '005food00.png'
    images['005food01'] = folder + '005food01.png'
    images['005food02'] = folder + '005food02.png'
    images['005food03'] = folder + '005food03.png'
    images['005food04'] = folder + '005food04.png'
    images['005food05'] = folder + '005food05.png'
    images['005food06'] = folder + '005food06.png'
    images['005food07'] = folder + '005food07.png'
    images['005food08'] = folder + '005food08.png'
    images['005food09'] = folder + '005food09.png'
    images['005food10'] = folder + '005food10.png'
    images['005food11'] = folder + '005food11.png'
    images['006bg'] = folder + '006bg.png'
    images['006instr'] = folder + '006instr.png'
    images['006veg1a'] = folder + '006veg1a.png'
    images['006veg1b'] = folder + '006veg1b.png'
    images['006veg1c'] = folder + '006veg1c.png'
    images['006veg2a'] = folder + '006veg2a.png'
    images['006veg2b'] = folder + '006veg2b.png'
    images['006veg2c'] = folder + '006veg2c.png'
    images['006veg3a'] = folder + '006veg3a.png'
    images['006veg3b'] = folder + '006veg3b.png'
    images['006veg3c'] = folder + '006veg3c.png'
    images['006veg4a'] = folder + '006veg4a.png'
    images['006veg4b'] = folder + '006veg4b.png'
    images['006veg4c'] = folder + '006veg4c.png'
    images['006veg5a'] = folder + '006veg5a.png'
    images['006veg5b'] = folder + '006veg5b.png'
    images['006veg5c'] = folder + '006veg5c.png'
    images['006veg6a'] = folder + '006veg6a.png'
    images['006veg6b'] = folder + '006veg6b.png'
    images['006veg6c'] = folder + '006veg6c.png'
    images['006veg7a'] = folder + '006veg7a.png'
    images['006veg7b'] = folder + '006veg7b.png'
    images['006veg7c'] = folder + '006veg7c.png'
    images['007scrollingbg1'] = folder + '007scrollingbg1.png'
    images['007scrollingbg2'] = folder + '007scrollingbg2.png'
    images['007instr'] = folder + '007instr.png'
    images['007piganimation'] = folder + '007piganimation.png'
    images['007cloud'] = folder + '007cloud.png'
    images['007pig1'] = folder + '007pig1.png'
    images['007pig2'] = folder + '007pig2.png'
    images['007pig3'] = folder + '007pig3.png'
    images['instr5seconds'] = folder + 'instr5seconds.png'
    images['instrready'] = folder + 'instrready.png';
    images['instrset'] = folder + 'instrset.png';
    images['olpig'] = folder + 'olpig.png'
    images['timer1'] = folder + 'timer1.png'
    images['timer2'] = folder + 'timer2.png'
    images['timer3'] = folder + 'timer3.png'
    images['timer4'] = folder + 'timer4.png'
    images['timer_num1'] = folder + 'timer_num1.png'
    images['timer_num2'] = folder + 'timer_num2.png'
    images['timer_num3'] = folder + 'timer_num3.png'
    images['heart'] = folder + 'heart.png'
    images['retry'] = folder + 'retry.png'
    images['menu'] = folder + 'menu.png'

setImgFolder();

images['menu_title'] = fonts['menu_title'].render(
                            strings['menu_title'],
                            True,
                            colors['menu'])
images['menu_instructions'] = fonts['menu'].render(
                            strings['menu_instructions'],
                            True,
                            colors['menu'])
images['gameover_title'] = fonts['gameover_title'].render(
                            strings['gameover_title'],
                            True,
                            colors['menu'])
images['gameover_instructions'] = fonts['menu'].render(
                            strings['gameover_instructions'],
                            True,
                            colors['menu'])